<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 包含头部信息用于适应不同设备 -->
<meta name="viewport"
	content="width=device-width, initial-scale=1
    	user-scalable=no">
<!-- 包含 bootstrap 样式表 -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/BootStrap/css/bootstrap.min.css">
<title>学生管理</title>

<script type="text/javascript">
	//删除学生
	function del(id) {
		$.get("${pageContext.request.contextPath }/student?method=delete?id="
				+ id, function(data) {
			/* alert(data.result); */
			if ("success" == data) {
				alert("删除成功!");
				window.location.reload();
			} else {
				alert("删除失败!")
			}
		});
	}

	//若学生信息修改有错-->则提示学生信息修改出错
	function error() {
		var error = "${error}";
		if (error.value != null) { //如果不等于空，说明返回来时出错
			alert(error.value);
		}
	}
	window.onload = error;

	//面包屑导航
	function setbreadcrumb() {
		$("ol.breadcrumb", parent.document).html(
				"<li><a href='javascript:void(0)''>首页</a></li>"
						+ "<li class='active'>修改学生<li>");
	}
</script>

</head>
<body>

	<%
		int a = 0;
	%>

	<div class="text-center">
		<strong style="font-size: 20px;">课程总览</strong>
		<!-- <strong class="pull-right">总人数：xx</strong> -->
	</div>
	<c:if test="${!empty courseList}">
		<c:forEach items="${courseList}" var="s">
			<table class="table table-hover table-bordered table-striped">
				<thead style="margin-top: 50px;">
					<tr>
						<th style="text-align: center; color: red;">课程</th>
					</tr>
				</thead>
				<tbody>
					<tr class="success">
						<td>${s.name }</td>
					</tr>
				</tbody>
				<table class="table table-hover table-bordered table-striped">
					<thead>
						<tr>
							<th style="text-align: center;">课程简介</th>
						</tr>
					</thead>
					<tbody>
						<tr class="success">
							<td>${s.simpleinfo }</td>
						</tr>
					</tbody>
				</table>
				
				<table class="table table-hover table-bordered table-striped">
				<thead>
					<tr>
						<th style="text-align: center;">教师简介</th>
					</tr>
				</thead>
				<tbody>
					<tr class="success">
						<td>${s.teacherinfo }</td>
					</tr>
				</tbody>
			</table>
			<table class="table table-hover table-bordered table-striped">
				<thead>
					<tr>
						<th style="text-align: center;">先导课程</th>
					</tr>
				</thead>
				<tbody>
					<tr class="success">
						<td>${s.beforeclear }</td>
					</tr>
				</tbody></table>
				<table class="table table-hover table-bordered table-striped">
				<thead>
					<tr>
						<th style="text-align: center;">教学计划</th>
					</tr>

				</thead>
				<tbody>
					<tr class="success">
						<td>${s.plan }</td>
					</tr>
				</tbody></table>
				<table class="table table-hover table-bordered table-striped">
				<thead>
					<tr>
						<th style="text-align: center;">考试方式</th>
					</tr>

				</thead>
				<tbody>
					<tr class="success">
						<td>${s.exam }</td>
					</tr>
				</tbody></table>
				<table class="table table-hover table-bordered table-striped">
				<thead>
					<tr>
						<th style="text-align: center;">参考书目</th>
					</tr>

				</thead>
				<tbody>
					<tr class="success">
						<td>${s.learnbooks }</td>
					</tr>
				</tbody></table>
				<table class="table table-hover table-bordered table-striped">
				<thead>
					<tr>
						<th style="text-align: center;">课件区</th>
					</tr>
				</thead>
				<tbody>
					<tr class="success">
						<td>${s.object.description }</td>
					</tr>
				</tbody>
			</table>
		</c:forEach>
	</c:if>



	<!-- JavaScript 放置在文档最后面可以使页面加载速度更快 -->
	<!-- 可选: 包含 jQuery 库 -->
	<script
		src="${pageContext.request.contextPath }/BootStrap/js/jquery-3.1.1.js"></script>
	<!-- 可选: 合并了 Bootstrap JavaScript 插件 -->
	<script
		src="${pageContext.request.contextPath }/BootStrap/js/bootstrap.min.js"></script>
</body>
</html>